package kgc.crm.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
    * 线索表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "kgc_crm_crm_leads")
public class Leads implements Serializable {
    @TableId(value = "leads_id", type = IdType.AUTO)
    private Integer leadsId;

    /**
     * 1已转化 0 未转化
     */
    @TableField(value = "is_transform")
    private Integer isTransform;

    /**
     * 跟进状态 0未跟进1已跟进
     */
    @TableField(value = "followup")
    private Integer followup;

    /**
     * 线索名称
     */
    @TableField(value = "leads_name")
    private String leadsName;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private Integer email;

    /**
     * 行业
     */
    @TableField(value = "industry")
    private String industry;

    /**
     * 客户级别 1=A(重点客户) 2 = B(普通客户) 3=C(非优先客户)
     */
    @TableField(value = "leads_level")
    private Integer leadsLevel;

    /**
     * 线索来源
     */
    @TableField(value = "leads_resource")
    private Integer leadsResource;

    /**
     * 客户id
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 下次联系时间
     */
    @TableField(value = "next_time")
    private Date nextTime;

    /**
     * 电话
     */
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 手机号
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建人ID
     */
    @TableField(value = "create_user_id")
    private Long createUserId;

    /**
     * 负责人ID
     */
    @TableField(value = "owner_user_id")
    private Long ownerUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 批次 比如附件批次
     */
    @TableField(value = "batch_id")
    private String batchId;

    @TableField(value = "last_content")
    private String lastContent;

    //供给MapperXML来使用的字段，这个字段不能给mp来用
    @TableField(exist = false)// 是否在mp中生效
    private String  userName;
    //供给MapperXML来使用的字段，这个字段不能给mp来用
    @TableField(exist = false)// 是否在mp中生效
    private String  deptName;
    @TableField(exist = false)// 是否在mp中生效
    private String  resouceValue;
    @TableField(exist = false)// 是否在mp中生效
    private String  levelValue;
    @TableField(exist = false)// 是否在mp中生效
    private String  industryValue;


    public static final String COL_LEADS_ID = "leads_id";

    public static final String COL_IS_TRANSFORM = "is_transform";

    public static final String COL_FOLLOWUP = "followup";

    public static final String COL_LEADS_NAME = "leads_name";

    public static final String COL_EMAIL = "email";

    public static final String COL_INDUSTRY = "industry";

    public static final String COL_LEADS_LEVEL = "leads_level";

    public static final String COL_LEADS_RESOURCE = "leads_resource";

    public static final String COL_CUSTOMER_ID = "customer_id";

    public static final String COL_NEXT_TIME = "next_time";

    public static final String COL_TELEPHONE = "telephone";

    public static final String COL_MOBILE = "mobile";

    public static final String COL_ADDRESS = "address";

    public static final String COL_REMARK = "remark";

    public static final String COL_CREATE_USER_ID = "create_user_id";

    public static final String COL_OWNER_USER_ID = "owner_user_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_BATCH_ID = "batch_id";

    public static final String COL_LAST_CONTENT = "last_content";
}